package org.sdp.pearproject.controller;


import org.sdp.pearproject.dto.request.*;
import org.sdp.pearproject.dto.response.*;
import org.sdp.pearproject.service.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.multipart.MultipartFile;

import java.io.File;
import java.util.Date;
import java.util.List;

/**
 * @ClassName: EventsSuperController
 * @Description:
 * @Author: SDP
 * @Date: 2022-07-27
 * @Version: 1.0
 * Table: pear_events
 * Comment:
 * 日程表
 */
public class EventsSuperController extends BaseController {
    @Autowired
    EventsService service;

    public Integer addEvents(EventsAddRequest request) throws Exception {
        return service.addEvents(request);
    }

    public Integer updateEvents(EventsUpdateRequest request) throws Exception {
        return service.updateEvents(request);
    }

    public Integer deleteEvents(EventsDeleteRequest request) throws Exception {
        return service.deleteEvents(request);
    }

    public EventsQueryResponse queryEvents(EventsQueryRequest request) throws Exception {
        return service.queryEvents(request);
    }

    public List<EventsQueryResponse> listEvents(EventsQueryRequest request) throws Exception {
        return service.listEvents(request);
    }

    public Integer countEvents(EventsQueryRequest request) throws Exception {
        return service.countEvents(request);
    }

    public BaseStatResponse statEvents(EventsQueryRequest request) throws Exception {
        return service.statEvents(request);
    }

    public List<EventsForEventsResponse> events(EventsForEventsRequest request) throws Exception {
        return service.events(request);
    }

    public Integer countForEvents(EventsForEventsRequest request) throws Exception {
        return service.countForEvents(request);
    }

    public BaseStatResponse statForEvents(EventsForEventsRequest request) throws Exception {
        return service.statForEvents(request);
    }

    public String exportExcelEvents(EventsForEventsRequest request) throws Exception {
        clearPageInfo(request);
        
        List<EventsForEventsResponse> list = service.events(request);
        return super.exportExcel(request, list);
    }
    
    public List<EventsForEventsMemberResponse> eventsMember(EventsForEventsMemberRequest request) throws Exception {
        return service.eventsMember(request);
    }

    public Integer countForEventsMember(EventsForEventsMemberRequest request) throws Exception {
        return service.countForEventsMember(request);
    }

    public BaseStatResponse statForEventsMember(EventsForEventsMemberRequest request) throws Exception {
        return service.statForEventsMember(request);
    }

    public String exportExcelEventsMember(EventsForEventsMemberRequest request) throws Exception {
        clearPageInfo(request);
        
        List<EventsForEventsMemberResponse> list = service.eventsMember(request);
        return super.exportExcel(request, list);
    }
    

}
